/**
 * org.assess.oa.system.dao.impl.TbRoleMenuItemDAOImpl
 */
package org.assess.oa.system.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.assess.core.dao.BaseDAOImpl;
import org.assess.oa.system.bean.TbRoleMenuItem;
import org.assess.oa.system.dao.TbRoleMenuItemDAO;

/**
 * @description 操作角色菜单项关联信息表的DAO层实现类
 * @author XiaLongxiang
 * @createtime 2012-6-5 上午11:14:34
 */
public class TbRoleMenuItemDAOImpl extends BaseDAOImpl<TbRoleMenuItem> implements TbRoleMenuItemDAO {
    public boolean deleteTbRoleMenuItemById(String role_menuitem_id) {
        sqlClient.delete("deleteTbRoleMenuItemById", role_menuitem_id);
        return true;
    }
    
    public boolean deleteTbRoleMenuItemByRoleId(String role_id) {
        sqlClient.delete("deleteTbRoleMenuItemByRoleId", role_id);
        return true;
    }
    
    public boolean deleteTbRoleMenuItemByMenuId(String menu_id) {
        sqlClient.delete("deleteTbRoleMenuItemByMenuId", menu_id);
        return true;
    }
    
    public boolean deleteTbRoleMenuItemByMenuItemId(String menuitem_id) {
        sqlClient.delete("deleteTbRoleMenuItemByMenuItemId", menuitem_id);
        return true;
    }
    
    public boolean deleteTbRoleMenuItemByRoleAndSystem(String role_id, String system_code) {
        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put("role_id", role_id);
        parameters.put("system_code", system_code);
        sqlClient.delete("deleteTbRoleMenuItemByRoleAndSystem", parameters);
        return true;
    }
}
